package org.example.myleet.p594;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(5 == solution.findLHS(new int[]{1,3,2,2,5,2,3,7}));
        Assert.isTrue(2 == solution.findLHS(new int[]{1,2,3,4}));
        Assert.isTrue(0 == solution.findLHS(new int[]{1,1,1,1,1,1}));
        Assert.isTrue(0 == solution.findLHS(new int[]{1,3,5,7,9,11,13,15,17}));
        Assert.isTrue(2 == solution.findLHS(new int[]{1,4,1,3,1,-14,1,-13}));
        Assert.isTrue(6 == solution.findLHS(new int[]{1,2,-1,1,2,5,2,5,2}));
    }
}
